Joint Photographic Experts Group (JPEG) is a popular lossy image compression method commonly used to compress digital images. JPEG uses a form of compression based on a discrete cosine transform (DCT). The operation converts each frame/field of the video source from the spatial (2D) domain into a frequency domain (also known as a transform domain). High-frequency information, such as sharp transitions in intensity and color hue, is then discarded. In the transform domain, information is reduced through a process known as quantization, which optimally reduces a large number scale (with different occurrences of each number) into a smaller one. The quantized coefficients are then sequenced and losslessly packed into an output bitstream.
Many types of images are commonly stored in JPEG format, including application textures for applications running on mobile devices, such as smartphones. Many computing devices, such as desktop and laptop computers, and more recently mobile devices such as smartphones and tablets, have graphical processing units (GPUs) that augment central processing units (CPUs) by providing a dedicated processor for performing graphics functions, such as transforms and rendering. GPUs typically utilize a texture compression format, such as Ericsson Texture Compression (ETC1, or more recently, ETC2).
In order to utilize a GPU on a JPEG image, it is often desirable to encode the JPEG in ETC2 format, but in order to do this an application first has to decode the JPEG image to a raw image buffer, stored in the RGB 888 format, and then encode it into ETC2. This process, however, is inefficient, wastes power, and wastes memory, which can be of significant value on low-memory, battery-constrained devices, such as a smartphones and tablets.
Storing textures directly in texture compression formats such as ETC2 generally require more memory than JPEG image compression format. Additionally, texture compression formats such as ETC2 are generally of lower lower quality than JPEG image compression format.